The Go Workshop by Delio D'Anna Andrew Hayes Sam Hennessy Jeremy Leasor Gobin Sougrakpam & Dániel Szabó

The Go Workshop by Delio D'Anna Andrew Hayes Sam Hennessy Jeremy Leasor Gobin Sougrakpam & Dániel Szabó

Author:Delio D'Anna, Andrew Hayes, Sam Hennessy, Jeremy Leasor, Gobin Sougrakpam & Dániel Szabó
Language: eng
Format: epub
Publisher: Packt Publishing Pvt Ltd
Published: 2019-12-26T16:00:00+00:00


Figure 10.2: Measuring the execution time

All that needs to be done is to capture the time when the script starts and ends. Then, we can calculate the duration by subtracting the start time and the end time. After that, we can utilize the Duration variable's functions to get the Hours(), Minutes(), Seconds(), and Nanoseconds() values of the time it took to complete the task.

There are four resolutions you will be provided with, namely:

Hours

Minutes

Seconds

Nanoseconds



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.